﻿CREATE TABLE [dbo].[tblCustomer] (
    [CustomerID]    INT           IDENTITY (1, 1) NOT NULL,
    [AllowRent]     BIT           NOT NULL,
    [AllowPhone]    BIT           NOT NULL,
    [AllowMail]     BIT           NOT NULL,
    [AllowEmail]    BIT           NOT NULL,
    [AllowCleaning] BIT           NOT NULL,
    [DoNotProcess]  BIT           NOT NULL,
    [ImportDate]    SMALLDATETIME NULL,
    [Password]      VARCHAR (20)  NULL,
    [OwnerID]       INT           NOT NULL,
    [PersonID]      INT           NOT NULL,
	[UserDefined1]         NVARCHAR (50)  NULL,
	[UserDefined2]         NVARCHAR (50)  NULL,
	[UserDefined3]         NVARCHAR (10)  NULL,
	[UserDefined4]         NVARCHAR (10)  NULL,
	[UserDefined5]         INT            NULL,
	[UserDefined6]         INT            NULL,
	[UserDefined7]         SMALLDATETIME  NULL,
	[UserDefined8]         BIT            NULL,
	[UserDefined9]         BIT            NULL
);


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Defines exactly one customer.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Primary key.  Unique identifier for customer.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'CustomerID';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Allows to call customer or not', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'AllowPhone';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Allows to email customer or not', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'AllowMail';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Whether future process is allowed for the customer or not.', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'DoNotProcess';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'Date the record was loaded into our system', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'ImportDate';


GO
EXECUTE sp_addextendedproperty @name = N'MS_Description', @value = N'The website password for the customer login', @level0type = N'SCHEMA', @level0name = N'dbo', @level1type = N'TABLE', @level1name = N'tblCustomer', @level2type = N'COLUMN', @level2name = N'Password';

